Video coding devices (image coding devices) for coding moving images to generate coded data, and video decoding devices (image decoding devices) for decoding the coded data to generate decoded images are used for efficient transmission or recording of moving images.
Specific examples of video coding schemes include video coding schemes in H.264/MPEG-4.AVC, schemes implemented in KTA software, which is a codec for joint development in VCEG (Video Coding Expert Group), schemes implemented in TMuC (Test Model under Consideration) software, and schemes proposed in HEVC (High-Efficiency Video Coding), which is a successor codec to H.264/MPEG-4.AVC (NPL 1).
In such video coding schemes, images (pictures) forming a moving image are managed using a hierarchical structure that is composed of slices obtained by partitioning each image, coding units obtained by splitting each slice, and blocks and partitions obtained by splitting each coding unit. The images (pictures) are generally coded/decoded on a block-by-block basis.
Such coding schemes generally involve generating a prediction image based on a locally decoded image obtained by coding and decoding an input image, and coding transform coefficients obtained by performing a frequency transform such as a DCT (Discrete Cosine Transform) transform on a difference image (also called a “residual image” or a “prediction residual”) between the prediction image and the input image on a block-by-block basis.
Known specific coding schemes for transform coefficients include context-based adaptive variable length coding (CAVLC) and context-based adaptive binary arithmetic coding (CABAC).
In CALVC, transform coefficients are sequentially scanned into a one-dimensional vector, and then syntax elements representing the respective values of the transform coefficients, and syntax elements representing lengths (also referred to as runs) of consecutive zeroes, and the like are coded.
In CABAC, a binarization process is performed on various syntax elements representing transform coefficients, and binary data obtained by the binarization process is arithmetically coded. The various syntax elements include a flag indicating whether or not a transform coefficient is 0, that is, a flag significant_coeff_flag indicating the presence or absence of a non-zero transform coefficient (also referred to as a transform coefficient presence/absence flag), and syntax elements last_significant_coeff_x and last_significant_coeff_y that specify the position of a last non-zero transform coefficient in the processing order.
In CABAC, furthermore, the coding of one symbol (one bit of binary data, also referred to as a bin) involves referring to a context index allocated to the frequency component to be processed, and performing arithmetic coding in accordance with the probability of occurrence specified by a probability state index included in a context variable identified by the context index. The probability of occurrence indicated by the probability state index is updated for each coding of one symbol.
NPL 1 describes (1) division of a frequency region for a block having a comparatively large size such as 16×16 pixels or 32×32 pixels into a plurality of sub-regions, (2) the allocation of a context index (also referred to as a position context) to a frequency component included in a low-frequency-side sub-region, the context index being determined in accordance with the position of the frequency component in the frequency region, and (3) the allocation of a context index (also referred to as a neighbouring reference context) to a frequency component included in a high-frequency-side sub-region, the context index being determined on the basis of the number of non-zero transform coefficients in neighbouring frequency components of the frequency component. This technology can keep the total number of contexts to be referred to small on the high-frequency side while reducing the amount of processing on the low-frequency side.
In NPL 2, a technology is known in which transform coefficients are coded using coding called bypass coding without using contexts while arithmetic coding is used (i.e., coding that is arithmetic coding and that does not use contexts), removing updating of contexts and improving throughput. This technology does not use existing binarization for CABAC coding but uses binarization for CAVLC coding.